package samsung.sds.business.vdiManagementSystem.firewallManagement.dao;

import java.util.List;

import samsung.sds.business.vdiManagementSystem.firewallManagement.model.FirewallEntity;
import samsung.sds.business.vdiManagementSystem.vdiManagement.model.VDIInfoEntity;
import samsung.sds.departmentManagement.model.DepartmentEntity;
import samsung.sds.system.common.baseQuery.BaseMapper;
import samsung.sds.system.common.model.QueryParam;

/**
 * @author hongxin.luo
 * @createDate 2016-04-21
 * 
 * 防火墙管理操作方法
 */
public interface FirewallMapper extends BaseMapper<FirewallEntity> {
	/**
	 * 查询组织结构与部门下的VDI信息
	 * @return
	 */
	List<DepartmentEntity> selectDEPT_VDI(String deptId);
	
	/**
	 * 查询VDI下的所有防火墙信息
	 * @param param
	 * @return
	 */
	List<FirewallEntity> queryFirewallInVDIListPage(QueryParam param);
	
    /**
     * 删除VDI下的防火墙信息
     * @param firewalls
     * @return
     */
	int updateVDI_FIREWALL(String lastModifyUser,String[] firewalls);
	
	/**
	 * find VDI by ip.
	 * @return
	 */
	List<VDIInfoEntity> findVDIIP();
	
	/**
	 * batch insert.
	 * @param list
	 */
	void batchInsert(List<FirewallEntity> list);
	
	/**
	 * 根据id更新防火墙信息
	 * @param firewallEntity
	 */
	void updateFirewallEntity(FirewallEntity firewallEntity);
	
	/**
	 * 根据vdiId查询防火墙列表
	 * @param vdiId
	 * @return
	 */
	List<FirewallEntity> queryFirewallEntityByVDIId(String vdiId);
	
	/**
	 * find fire wall by id.
	 * @param id
	 * @return
	 */
	FirewallEntity getFireWallByID(String id);
	
	/**
	 * 
	 * @param firewallEntitys
	 * @return
	 */
	int batchUpdateFirewallEntity(List<FirewallEntity> firewallEntitys);
	
	int insertFireWallInfo(FirewallEntity fe);
}
